    export const deleteItem = (data,item) => {
      data.splice(data.indexOf(item), 1)
    }
    export const addItem = (data) => {
      data.push({
            key: 1,
            label: "姓名",
            value: "",
            placeholder1: "请输入字段名",
            placeholder2: "请输入字段值",
            type: "input",
            icon: "",
            draggable: true,
            isShow: true,
            isDelete: true,
          });
    }
    export const delExtendItem = (data, item) => {
      data.splice(data.indexOf(item), 1);
    };
    export const addWorkItem = (data) => {
      data.push({
        isShow: true,
        isDelete: true,
        isExtend: false,
        draggable: true,
        itemInfo: {
          companyName: {
            label: "公司名称",
            value: "",
            required: true,
            placeholder: "输入公司名称",
          },
          companyAddress: {
            label: "公司地址",
            value: "",
          },
          workTime: {
            label: "工作时间",
            value: "",
          },
          //岗位
          workPost: {
            label: "岗位",
            value: "",
          },
          itemContent: {
            label: "工作内容",
            value: "",
          },
        },
      });
    }
   export const addSchoolItem = (data) => {
      data.push({
        isShow: true,
        isDelete: true,
        isExtend: false,
        draggable: true,
        itemInfo: {
          //名称、专业、学历、gpa、开始时间、结束时间
          schoolName: {
            label: "学校名称",
            value: "",
          },
          schoolMajor: {
            label: "专业",
            value: "",
          },
          schoolDegree: {
            label: "学历",
            value: "",
          },
          schoolGpa: {
            label: "GPA",
            value: "",
          },
          schoolStartTime: {
            label: "开始时间",
            value: ''
          },
          schoolEndTime: {
            label: "结束时间",
            value: ''
          },
          itemContent: {
            label: "学习经历",
            value: "",
          },
        },
      });
    }
    export const addProjectItem = (data) => {
      data.push({
        isShow: true,
        isDelete: true,
        isExtend: false,
        draggable: true,

        itemInfo: {
          projectName: {
            label: "项目名称",
            value: "",
          },
          projectRole: {
            label: "项目角色",
            value: "",
          },
          projectLink: {
            label: "项目链接",
            value: "",
          },
          projectTime: {
            label: "项目时间",
            value: "",
          },
          itemContent: {
            label: "项目描述",
            value: "",
          },
        },
      });
    }
    export const addModel = (data) => {
      data.push({
        title: "自定义模块",
        icon: "",
        showSetting: true,
        draggable: true,
        isDelete: true,
        showItem: true,
        active: false,
        component: "custom",
        value: "",
        isShow: true,
      })
    }
   export const deleteModel = (data,e) => {
      if (e.active) {
        e.active = false
        data[0].active = true
      }
      data.splice(data.indexOf(e), 1)
    }